package com.bjpowernode.security06jwtredismysql.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName sys_role_user
 */
@TableName(value ="sys_role_user")
public class SysRoleUser {
    /**
     * 用户编号
     */
    @TableId
    private Integer uid;

    /**
     * 角色编号
     */

    private Integer rid;

    /**
     * 用户编号
     */
    public Integer getUid() {
        return uid;
    }

    /**
     * 用户编号
     */
    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * 角色编号
     */
    public Integer getRid() {
        return rid;
    }

    /**
     * 角色编号
     */
    public void setRid(Integer rid) {
        this.rid = rid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRoleUser other = (SysRoleUser) that;
        return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", uid=").append(uid);
        sb.append(", rid=").append(rid);
        sb.append("]");
        return sb.toString();
    }
}